/**
 * 
 */
package com.gragra.sampling.sequentialStructure.tests;
import static org.junit.Assert.*;
import org.junit.Test;
import com.gragra.sampling.sequentialStructure.ExtensionLevels;
import com.gragra.sampling.sequentialStructure.HyphenType;
/**
 * @author Christoph Teichmann
 * 01.06.2013
 */
public class TestHyphenType
{
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.HyphenType#getLevel()}.
	 */
	@Test
	public void testGetLevel()
	{assertEquals(HyphenType.PostHyphen.getLevel(),ExtensionLevels.HyphenLevel);}
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.HyphenType#getNumber()}.
	 */
	@Test
	public void testGetNumber()
	{

		int num1 = HyphenType.InternalHyphen.getNumber();
		int num2 = HyphenType.InternalHyphen.getNumber();
		int num3 = HyphenType.NoHyphen.getNumber();
		assertEquals(num1,num2);
		assertFalse(num1 == num3);
		assertEquals(HyphenType.values()[num1],HyphenType.InternalHyphen);
		assertEquals(HyphenType.values()[num3],HyphenType.NoHyphen);
	}
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.HyphenType#classify(java.lang.String)}.
	 */
	@Test
	public void testClassify()
	{
		String one = "Hammer-";
		String two = "-Verkauf";
		String three = "Hammer-Verkauf";
		String four = "Hammer";
		String five = "---";
		String six = "-";
		assertEquals(HyphenType.PostHyphen,HyphenType.classify(one));
		assertEquals(HyphenType.PreHyphen,HyphenType.classify(two));
		assertEquals(HyphenType.InternalHyphen,HyphenType.classify(three));
		assertEquals(HyphenType.NoHyphen,HyphenType.classify(four));
		assertEquals(HyphenType.AllHyphen,HyphenType.classify(five));
		assertEquals(HyphenType.AllHyphen,HyphenType.classify(six));
	}
}